package com.compname.pro1.net;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;

public class ClinetTest {

	public static void main(String[] args) throws Exception{
		Socket sk=new Socket("localhost", 7777);
		BufferedReader reader=new BufferedReader(new InputStreamReader(sk.getInputStream()));
		OutputStream out=sk.getOutputStream();
		String info=reader.readLine();
		System.out.println(info);
		out.write("JohYu\n".getBytes());
		String info1=reader.readLine();
		System.out.println(info1);
		reader.close();
		out.close();
		sk.close();
	}

}
